package rush.rushcampus.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import rush.rushcampus.utils.LocalDateTimeDeserializer;

/**
 * <p>
 *
 * </p>
 *
 * @author rush
 * @since 2024-06-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("comment")
@ApiModel(value="Commment对象", description="")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String content;

    private Long userId;

    private Integer commentType;

    @JsonDeserialize(using = LocalDateTimeDeserializer.class) // 使用自定义反序列化器
    private LocalDateTime addTime;

    private Integer isPrivate;

    private Long articleId;

    private Long parentComment;
    private Integer commentBelongs;
}
